package com.wpml.cloud.myprovider;

import com.wpml.cloud.myprovider.model.Person.Person;

/**
 * @Description
 * @Date 2021-05-17
 * @Author wangpei
 **/
public class Main {

    public static void main(String[] args) {
        Person li_si = new Person(2, "li si");

        new Thread(() -> {
            li_si.setAge(4);

            System.out.println(li_si.hashCode() + " " + Thread.currentThread().getName() + " " + li_si);
        }, "B").start();


        new Thread(() -> {
            li_si.setAge(6);

            System.out.println(li_si.hashCode() + " " + Thread.currentThread().getName() + " " + li_si);
        }, "A").start();

        try {
            Thread.sleep(2000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
